﻿<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>登录界面</title>
<meta name="keywords" content="关键词，关键词"/>
<meta name="description" content=""/>
<link href="css/style.css" rel="stylesheet"/>
<script src="js/jquip.min.js"></script>
<script type="text/javascript">
	$(function(){
		if(window.screen.availHeight>=870){
			var marginTop=(window.screen.availHeight*0.15)+"px";
		}else if(window.screen.availHeight>=738){
			var marginTop=(window.screen.availHeight*0.095)+"px";
		}else if(window.screen.availHeight<=690){
			var marginTop=(window.screen.availHeight*0.06)+"px";
		}
		$('.logo_01').css('marginTop',marginTop);
	});
	function check()
	{
		var user = window.document.getElementById("user").value;
		var psk = window.document.getElementById("psk").value;
		if (user == "")
		{
			alert("请输入姓名！");
		}
		else if (psk == "")
		{
			alert("请输入密码！");
		}
		else
		{
			$.ajax({ 
			url: "/auth-bin/login?user="+user+"&psk="+psk+"&__time="+Date.parse( new Date()), 
			async: true,
			cache: false,
			dataType: 'json', 
			success: function(data){
				if(data.ret==0){
					self.location = 'index.html';
				} else {
					alert(data.msg);
				}
			},
			timeout: 5000,
			error: function( ){
				alert( "登录异常,请重试!" );
			}
			});
		}
	}
</script>
</head>
<body>
	<div class="logo_01">
			<img src="images/logo2.png">
	</div>
	<div class="logo_02">
			智能可在线编程RTU---ST-8803E
	</div>
	<div id="Logo">
		<form class="form" name="form1" method="post" action="">
			<div class="form_box">
				<p><img src="images/1.png"/><input onkeydown='if(event.keyCode==13){login.click()}' type="text" name="user" id="user" placeholder="用户名"></p>
				<p><img src="images/2.png"/><input onkeydown='if(event.keyCode==13){login.click()}' type="password" name="psk" id="psk" placeholder="密码"></p>
				<p class="che"><input id="checkbox1" type="checkbox" value="记住密码">&nbsp;&nbsp;记住密码</p>
			</div>
			<div class="form_submit">
				<a href="#" id="login" onclick="check();">登录</a>
			</div>
		</form>
		<div class="footbox">Copyright © 2016.Company name All rights reserved.</div>
	</div>
</body>
</html>

























